package com.yan.exceptiontest;

import java.util.Scanner;
public class Test11 {
    public static void main(String[] args) {
        int profit;
        double bonus = 0;
        Scanner input = new Scanner(System.in);
        System.out.println("输入月利润");
        profit = input.nextInt();
        if (profit <= 100000) {
            bonus = profit * 0.1;
        } else if (profit > 100000 && profit <= 200000) {
            bonus = (profit - 100000) * 0.075 + 100000 * 0.1;
        } else if (profit > 200000 && profit <= 400000) {
            bonus = (profit - 200000) * 0.05 + 100000 * 0.075 + 100000 * 0.1;
        } else if (profit > 400000 && profit <= 600000) {
            bonus = (profit - 400000) * 0.03 + 200000 * 0.05 + 100000 * 0.075 + 100000 * 0.1;
        } else if (profit > 600000 && profit <= 1000000) {
            bonus = (profit - 600000) * 0.015 + 200000 * 0.03 + 200000 * 0.05 + 100000 * 0.075 + 100000 * 0.1;
        } else if (profit > 1000000) {
            bonus = (profit - 1000000) * 0.01 + 400000 * 0.015 + 200000 * 0.03 + 200000 * 0.05 + 100000 * 0.075 + 100000 * 0.1;
        }
        System.out.println(bonus);
    }
}
